<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript">
$('#ddAddPid').combotree({
	url : '${ctx}/dd/tree.do',
	parentField : 'pid',
	lines : true,
	panelHeight : '400',
	value : '${dd.pid}',
	editable:true,
	selectOnNavigation:true,
	mode: 'remote',
	onLoadSuccess : function() {
		$.messager.progress('close');
	},
	onChange : function(newValue, oldValue){
		$.ajax({
			url:'${ctx}/dd/ddorderno.do',
			data:{
				'id':newValue
			},
			dataType:'json',
			success:function(data){
				$("#orderno").attr("value",data+1);
			}
		});
	}
});
$(function(){
	$("#ddnames").blur(function(){
		$("#ddvalues").attr("value",$("#ddnames").val());
	});
});
function getText(){
    var val = $('#ddAddPid').combotree('getText');
    $('#ddAddPid').combotree('reload','${ctx}/dd/reloadTree.do?text='+val);
}
</script>
	<form id="ddadd_Form" method="post">

        <div class="info-panel" style="width:600px;">
            <div class="panel" style="display: block;width:600px;">
                <div class="panel-header" style="width: 600px;">
                    <div class="panel-title"></div>
                    <div class="panel-tool"></div>
                </div>
                <table  title="" class="easyui-panel panel-body">
                    <tbody>
                    <tr>
                        <td>所属分组：</td>
                        <td>
                            <select type="text" id="ddAddPid" name="pid" style="width: 260px; height: 29px;"></select>
                            <a href="javascript:void(0);" class="easyui-linkbutton"
                               data-options="iconCls:'icon-search',plain:true"
                               onclick="getText();">加载</a>
                        </td>
                    </tr>
                    <tr>
                        <td>数据字典名称：</td>
                        <td><input style="width:260px;height: 29px;" type="text" name="text" id="ddnames" class="easyui-validatebox"  data-options="required:true,missingMessage:'数据字典名称不能为空！'"/></td>
                    </tr>
                    <tr>
                    <tr>
                        <td>数据字典值：</td>
                        <td><input style="width:260px;height: 29px;" type="text" name="value" id="ddvalues" class="easyui-validatebox" data-options="required:true,missingMessage:'数据字典值不能为空！'"/></td>
                    </tr>
                    <tr>
                        <td>是否是标题：</td>
                        <td>
                            <select style="width: 260px;" name="isTitle" class="easyui-combobox easyui-validatebox"
                                    data-options="height:30,
											  editable:false,required:true,
											  panelHeight:'auto'">
                                <option selected="selected" value="否">否</option>
                                <option value="是">是</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>是否是热门关键词：</td>
                        <td>
                            <select style="width: 260px;" name="isHot" class="easyui-combobox easyui-validatebox"
                                    data-options="height:30,
											  editable:false,required:true,
											  panelHeight:'auto'">
                                <option selected="selected" value="否">否</option>
                                <option value="是">是</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>序号：</td>
                        <td>
                            <input style="width:260px;height: 29px;" type="text" id="orderno" name="orderno" class="easyui-validatebox" data-options="required:true,missingMessage:'序号不能为空！'"/>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>




	</form>
